// gcc somesum.c -o somesum -lm
// gcc -lm -shared -Wl,-soname,somesum -o somesum.so -fPIC somesum.c // if use #include <math.h>

// gcc -shared -Wl,-soname,somesum -o somesum.so -fPIC somesum.c // for Linux
// gcc -shared -Wl,-soname,somesum -o somesum.DLL -fPIC somesum.c

unsigned long long int integer_pow(unsigned long long int x, unsigned long long int n)
{
    unsigned long long int r = 1;
    while (n--)
        r *= x;

    return r; 
}

unsigned long long int some_sum(unsigned long long int n, unsigned long long int m) {
	unsigned long long int s = 0;
	for(int i = 0; i <= n; i++)
		s += integer_pow(i,m);
	return s;
}